package yl.hs.bmipfull.pojo.production;

import lombok.Data;
import org.springframework.lang.Nullable;
import yl.hs.bmipfull.annotations.DBField;
import yl.hs.bmipfull.annotations.DBTable;
import yl.hs.bmipfull.pojo.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 作用:  产品发货单实体类<br/>
 * 创建时间: 2021年06月21日 10时08分52秒 <br/>
 *
 * @author 谢东
 */
@DBTable(disName = "产品发货单", mapCode = "product_ship_order")
@Data
public class ProductShipOrderEntity extends BaseEntity {

    /**
     * 主键
     */
    @Nullable
    private Long id;
    /**
     * 编号
     */
    @DBField(disName = "产品发货单编号", mapCode = "sn", isSerialNumber = true, isRequire = true, snPrefix = "FHD",isExport = true)
    private String sn;
    /**
     * 客户编号
     */
    @DBField(disName = "客户编号",mapCode = "customerSN",isExport = true)
    private String customerSN;
    /**
     * 合同编号
     */
    @DBField(disName = "合同编号",mapCode = "contractSN",isExport = true)
    private String contractSN;
    /**
     * 客户名称
     */
    @DBField(disName = "客户名称",mapCode = "customerName",isExport = true)
    private String customerName;
    /**
     * 客户名称拼音
     */
    @DBField(disName = "客户名称拼音",mapCode = "customerNamePY",isExport = true)
    private String customerNamePY;
    /**
     * 工地编号
     */
    @DBField(disName = "工地编号",mapCode = "projectSN",isExport = true)
    private String projectSN;
    /**
     * 工地名称
     */
    @DBField(disName = "工地名称",mapCode = "projectName",isExport = true)
    private String projectName;
    /**
     * 工地名称拼音
     */
    @DBField(disName = "工地名称拼音",mapCode = "projectNamePY",isExport = true)
    private String projectNamePY;
    /**
     * 工地地址
     */
    @DBField(disName = "工地地址",mapCode = "address",isExport = true)
    private String address;
    /**
     * 工地地址拼音
     */
    @DBField(disName = "工地地址拼音",mapCode = "addressPY",isExport = true)
    private String addressPY;
    /**
     * 施工部位
     */
    @DBField(disName = "施工部位",mapCode = "buildPosition",isExport = true)
    private String buildPosition;
    /**
     * 单据类型
     */
    private Short orderType;
    /**
     * 车辆编号
     */
    @DBField(disName = "车辆编号",mapCode = "truckSN",isExport = true)
    private String truckSN;
    /**
     * 车辆自编号
     */
    @DBField(disName = "车辆自编号",mapCode = "truckCode",isExport = true)
    private String truckCode;
    /**
     * 车牌号
     */
    @DBField(disName = "车牌号",mapCode = "truckPlate",isExport = true)
    private String truckPlate;
    /**
     * 产品标签
     */
    @DBField(disName = "产品标签",mapCode = "productTags",isExport = true)
    private String productTags;
    /**
     * 累计车次
     */
    private int cumulativeTrucks;
    /**
     * 累计量
     */
    private BigDecimal cumulativeQuantity;
    /**
     * 皮重
     */
    private BigDecimal tareWeight;
    /**
     * 原始皮重
     */
    private BigDecimal orgTareWeight;
    /**
     * 砂浆方量
     */
    private BigDecimal grossWeight;
    /**
     * 毛重
     */
    private BigDecimal appendWeight;
    private BigDecimal price;

    private BigDecimal amount;

    /**
     * 销售方量
     *
     * @return
     */
    private BigDecimal salesVolume;
    /**
     * 产品名称
     */
    @DBField(disName = "产品名称",mapCode = "productName",isExport = true)
    private String productName;
    /**
     * 原始毛重
     */
    private BigDecimal orgGrossWeight;
    /**
     * 容重
     */
    private BigDecimal density;
    /**
     * 净重
     */
    private BigDecimal netWeight;
    /**
     * 数量
     */
    @DBField(disName = "方量",mapCode = "quantity",isExport = true)
    private BigDecimal quantity;
    /**
     * 计量单位
     */
    private String unitName;
    /**
     * 包装重量
     */
    private BigDecimal packWeight;
    /**
     * 包装方式
     */
    private String packWay;
    /**
     * 包装编号
     */
    private String packUnit;
    /**
     * 操作员编号
     */
    @DBField(disName = "操作员编号",mapCode = "handlerSN",isExport = true)
    private String handlerSN;
    /**
     * 操作员
     */
    @DBField(disName = "操作员",mapCode = "handlerName",isExport = true)
    private String handlerName;
    /**
     * 客户联系人
     */
    @DBField(disName = "客户联系人",mapCode = "linkerName",isExport = true)
    private String linkerName;
    /**
     * 客户联系电话
     */
        @DBField(disName = "客户联系电话",mapCode = "linkePhone",isExport = true)
    private String linkePhone;
    /**
     * 销售员
     */
    @DBField(disName = "销售员",mapCode = "salerName",isExport = true)
    private String salerName;
    /**
     * 销售员电话
     */
    @DBField(disName = "销售员电话",mapCode = "salePhone",isExport = true)
    private String salePhone;
    /**
     * 虚拟量
     */
    private BigDecimal virtualQuantity;
    /**
     * 打印方式
     */
    private Short printWay;
    /**
     * 合并单号
     */
    private String mergeSN;
    /**
     * 发货时间
     */
    @DBField(disName = "发货时间",mapCode = "outTime",isExport = true)
    private Date outTime;
    @DBField(disName = "签约单位", mapCode = "contractingUnit")
    private String contractingUnit;
    /**
     * 组织代码
     */
    private String organizationCode;
    /**
     * 任务编号
     */
    @DBField(disName = "任务编号",mapCode = "taskSN",isExport = true)
    private String taskSN;
    /**
     * 生产线编号
     */
    @DBField(disName = "生产线编号",mapCode = "lineSN",isExport = true)
    private String lineSN;
    /**
     * 司机编号
     */
    @DBField(disName = "司机编号",mapCode = "driverSN",isExport = true)
    private String driverSN;
    /**
     * 司机姓名
     */
    @DBField(disName = "司机姓名",mapCode = "driverName",isExport = true)
    private String driverName;
    /**
     * 打印标题
     */
    private String printTitle;
    /**
     * 备注
     */
    private String remark;
    /**
     * 状态
     */
    @DBField(disName = "状态",mapCode = "state",isExport = true)
    private Short state;
    /**
     * 回厂时间
     */
    private Date backTime;
    /**
     * 回厂重量
     */
    private BigDecimal backWeight;
    /**
     * 生产线名称
     */
    private String productLineName;
    /**
     * 打印次数
     *
     * @return
     */
    private int printcount;
    /**
     * 产品编号
     */
    @DBField(disName = "产品编号",mapCode = "productSN",isExport = true)
    private String productSN;
    /**
     * 产品种类名称
     */
    @DBField(disName = "产品种类",mapCode = "productCate",isExport = true)
    private String productCate;
    /**
     * 产品种类编号
     */
    @DBField(disName = "产品种类编号",mapCode = "productCateSN",isExport = true)
    private String productCateSN;
    @DBField(disName = "产品规格",mapCode = "productSpec",isExport = true)
    private String productSpec;
    /**
     * 票据产品名称
     */
    private String billProductName;
    /**
     * 票据产品规格
     */
    private String billProductSpec;
    /**
     * 票据产品编号
     */
    private String billProductSN;
    /**
     * 结算产品名称
     */
    private String accountProductName;
    /**
     * 结算产品规格
     */
    private String accountProductSpec;
    /**
     * 结算产品编号
     */
    private String accountProductSN;

    /**
     * 沥青温度
     */
    private BigDecimal temp;

    /**
     * 创建时间
     */
    private Date createTime=new Date();
    /**
     * 外出时长(分钟)
     */
    private int outTimeLength;

    /**
     * 签收人
     */
    private String signer;
    /**
     * 签收时间
     */
    private Date signingTime;

    /**
     * 签收签名
     */
    private String signSVG;
    /**
     * 签收数量
     */
    private BigDecimal signedQuantity = BigDecimal.ZERO;

    /**
     * 审核时间
     */
    private Date shipmentReviewTime;
    /**
     * 审核重量
     */
    private BigDecimal shipmentReviewWeight=BigDecimal.ZERO;
    /**
     * 审核单价
     */
    private BigDecimal shipmentReviewPrice=BigDecimal.ZERO;
    /**
     * 审核数量
     */
    private BigDecimal shipmentReviewQuantity=BigDecimal.ZERO;
    /**
     * 审核人标识
     */
    private String shipmentReviewUserSN;
    /**
     * 审核人姓名
     */
    private String shipmentReviewUserName;

    /**
     * 审核标记
     */
    private String shipmentReviewFlag;

    /**
     * 签收重量
     */
    private BigDecimal signedWeight = new BigDecimal(0);
    /**
     * 签收方式
     */
    private String signWay;

    private String signRemark;
    private String signPhotoPath;

    private BigDecimal freightAmount = BigDecimal.ZERO;

    /**
     * 审核备注
     */
    private String shipmentReviewRemark;

    private BigDecimal turnSiteFreight=BigDecimal.ZERO;

    /**
     * 签收数量
     */
    private BigDecimal quantityReturned;

    private short freightState=0;
    private Date freightReviewTime;
    private BigDecimal freightReviewAmount = BigDecimal.ZERO;
    private String freightReviewUserSN;
    private String freightReviewUserName;
    private String freightReviewRemark;
    private boolean isTransfer;

    private boolean invoicingState;
}